<template>
  <div>
      <mc-api :data="data" @save-data="saveData" :show-limit="true"></mc-api>
      <el-button @click="print">打印</el-button>
      <el-button @click="change">变更</el-button>
  </div>
</template>

<script>
import McApi from './components/McApi'
export default {
    data(){
      return {
          data:{
            method:"get",//post|get
            url:"",//
            params:[{name:"",compare:"",value:"",type:""}],//name入参名 compare:比较符号 value:值 type:number,string
            fields:[{"name":"name","title":"姓名"}],
            orders:[{name:"dd",type:"desc"}]
          }
		  }
    },
    components:{
      McApi,
    },
    methods:{
        print(){
            console.log(this.data)
        },
        saveData(val){
            console.log(val);
        },
        change(){
            this.data.fields = [{"name":"id","title":"主键"}]
        }
    }
}
</script>

<style>

</style>
